package com.workstudy.wstudy.service.impl;

import com.workstudy.common.annotation.DataScope;
import com.workstudy.common.core.domain.entity.SysDept;
import com.workstudy.wstudy.domain.WstPost;
import com.workstudy.wstudy.domain.WstStudent;
import com.workstudy.wstudy.mapper.WstSummaryMapper;
import com.workstudy.wstudy.service.IWstSummaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class WstSummaryServiceImpl implements IWstSummaryService {
    @Autowired
    private WstSummaryMapper summaryMapper;

    @Override
    public List<SysDept> queryDeptPost(SysDept sysDept) {
        return summaryMapper.queryDeptPost(sysDept);
    }

    @Override
    @DataScope(deptAlias = "d", userAlias = "u")
    public List<WstPost> queryPostNum(WstPost post) {
        return summaryMapper.queryPostNum(post);
    }

    @Override
    public List<WstStudent> queryStudent(WstStudent wstStudent) {
        return summaryMapper.queryStudent(wstStudent);
    }
}
